package com.free.framework.lib.utils;

import android.os.StrictMode;

import com.free.framework.BuildConfig;

/**
 * @author 李博
 * @date 2016年10月31日
 * @desc
 */
public class StrictModeWrapper {

    public static void init() {
        if (BuildConfig.DEBUG) {
            StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
                    .detectDiskReads()
                    .detectDiskWrites()
                    .detectNetwork()
                    .penaltyLog()
                    .build());
            StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
                    .detectLeakedSqlLiteObjects()
                    .penaltyLog()
                    .penaltyDeath()
                    .build());
        }
    }

}
